<?php $this->load->module('mobile/index/header', $common);?>
<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/main.css" />
<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/dialog.css" />
<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/base.css" />
<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/index.css" />
<link rel="stylesheet" type="text/css" href="<?php echo URLPRE;?>static/template/default/mobile/css/line.css" />

<script type="text/javascript" src="<?php echo URLPRE;?>static/template/default/mobile/js/mobilecommon.js"></script>
<script type="text/javascript" src="<?php echo URLPRE;?>static/template/default/mobile/js/slider.js"></script>
<script type="text/javascript" src="<?php echo URLPRE;?>static/template/default/mobile/js/dialog.js"></script>

<form>
<div class="container">
    <div class="w-item conlist">
        <dl class="fn-clear">
            <dt>温馨提示：</dt>
            <dd id="sName">欢迎您在此处留下您的联系方式，我们将在24小时内联系您！</dd>
        </dl>
    </div>
    <div class="w-item conlist">

        <dl class="in-item fn-clear">
            <dt>公司名称：</dt>
            <dd id="sName"><input type="text" name="Form[email]" placeholder="请填写您的公司名称" value="" class="writeok"></dd>
        </dl>
    </div>
    <div class="w-item conlist">
        <dl class="in-item fn-clear">
            <dt>联系人</dt>
            <dd><input type="text" name="Form[name]" placeholder="先生/女士" value="" class="writeok"></dd>
        </dl>
    </div>
    <div class="w-item conlist">
        <dl class="in-item fn-clear borderTop">
            <dt>联系电话</dt>
            <dd><input type="tel" name="Form[mobile]" maxlength="11" placeholder="固话号码或手机号码" value="" class="writeok"></dd>
        </dl>
    </div>

</div>
<div class="col_div">
    <a href="javascript:void(0);" class="btn btn-orange btn_submit" title="确定">确定</a>
</div>
</form>

<?php $this->load->module('mobile/index/footer',$common);?>
<script type="text/javascript">
    function alert_popup(text, t){
        $.dialog({
            style:'tip',
            width:200,
            closeTime:t,
            content: '<p style="text-align: center">'+text+'</p>'
        }).open();
    }

    $(function(){
        var slid = $("#sliderimg").slider({
            loop: true
        });

        $('.btn_submit').click(function(){


            if($('input[name="Form[name]"]').val().length == 0){
                alert_popup('请填写联系人', 1000);
                return false;
            }

            if($('input[name="Form[mobile]"]').val().length == 0){
                alert_popup('请填写联系电话', 1000);
                return false;
            }

            $.ajax(
                {
                    type:'post',
                    url : '<?php echo '#' ;?>',
                    data:{
                        'Form[name]': $('input[name="Form[name]"]').val(),
                        'Form[mobile]': $('input[name="Form[mobile]"]').val(),
                        'Form[email]': $('input[name="Form[email]"]').val(),
                        post:1
                    },
                    dataType : 'jsonp',
                    jsonp:"jsoncallback",
                    success  : function(data) {
                        alert_popup(data,5000);
                        setTimeout(function () {
                            window.location.href = '<?php echo site_url() ?>';
                        }, 5000);
                    },
                    error : function() {
                        alert_popup('请直接拨打 <a href="tel:<?php echo $site_service_phone?>"><?php echo $site_service_phone?></a>', 5000);
                    }
                }
            );
        })


    });
</script>